import request from '@/utils/request';

const seqSampleApi = {};

seqSampleApi.getSampleTemplateFilePath = (id) => {
	return request({
		url: '/platform-api/seq-sample-data/template-file-path/' + id,
		method: 'get',
	})
}
seqSampleApi.delSampleTemplateFile = (id) => {
	return request({
		url: '/platform-api/seq-sample-data/del-template-file/' + id,
		method: 'put',
	})
}
seqSampleApi.copyApplicationTemplate = (id) => {
	return request({
		url: '/platform-api/seq-sample-data/copy-app-template/' + id,
		method: 'put',
	})
}
seqSampleApi.getSampleFileUrl = (id) => {
	return request({
		url: '/platform-api/seq-sample-data/sample-file-url/' + id,
		method: 'get',
	})
}
seqSampleApi.setDetection = (id, detection) => {
	return request({
		url: '/platform-api/seq-sample-data/set-detection/' + id + '?detection=' + detection,
		method: 'put',
	})
}
seqSampleApi.uploadResearchSample = (params) => {
	return request({
		url: '/platform-api/seq-sample-data/upload-content',
		method: 'put',
		data: params,
	})
}
seqSampleApi.uploadUpdateContent = (params) => {
	return request({
		url: '/platform-api/seq-sample-data/upload-update-content',
		method: 'put',
		data: params,
	})
}
seqSampleApi.labUploadContent = (params) => {
	return request({
		url: '/platform-api/seq-sample-data/lab-upload-content',
		method: 'put',
		data: params,
	})
}

seqSampleApi.updateIsExist = (projectId) => {
	return request({
		url: '/platform-api/seq-sample-data/check-exist/' + projectId,
		method: 'put',
	})
}
seqSampleApi.countGroup = (projectId, groupName) => {
	return request({
		url: '/platform-api/seq-sample-data/group/' + projectId + "?groupName=" + groupName,
		method: 'get',
	})
}
seqSampleApi.setListValid = (projectId, valid) => {
	return request({
		url: '/platform-api/seq-sample-data/set-list-valid/' + projectId + '?valid=' + valid,
		method: 'put',
	})
}
seqSampleApi.setValid = (id, valid) => {
	return request({
		url: '/platform-api/seq-sample-data/set-valid/' + id + '?valid=' + valid,
		method: 'put',
	})
}
seqSampleApi.sendKafka = (id) => {
	return request({
		url: '/platform-api/seq-sample-data/send-mq/' + id,
		method: 'put',
	})
}
seqSampleApi.page = (params) => {
	return request({
		url: '/platform-api/seq-sample-data/page',
		method: 'post',
		data: params,
	})
}
seqSampleApi.add = (params) => {
	return request({
		url: '/platform-api/seq-sample-data',
		method: 'post',
		data: params,
	})
}
seqSampleApi.update = (params) => {
	return request({
		url: '/platform-api/seq-sample-data',
		method: 'put',
		data: params,
	})
}
seqSampleApi.get = (id) => {
	return request({
		url: '/platform-api/seq-sample-data/' + id,
		method: 'get',
	})
}
seqSampleApi.delete = (id) => {
	return request({
		url: '/platform-api/seq-sample-data/' + id,
		method: 'delete',
	})
}

// 获取体检项列表
seqSampleApi.checkupList = (id) => {
	return request({
		url: '/platform-api/fmt-donor-checkup/items/' + id,
		method: 'get',
	})
}
// 删除体检项信息
seqSampleApi.deleteCheckup = (id) => {
	return request({
		url: '/platform-api/fmt-donor-checkup/del-item/' + id,
		method: 'delete',
	})
}

export default seqSampleApi